package demo3;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:张熳
 * Date:2025-08-28
 * Time:17:24
 */
//接口的使用

//如果类没有实现接口中的所有的抽象方法，则类必须设置为抽象类
abstract class A implements USB {

}

public class Test {
    public static void main(String[] args) {
        Computer computer = new Computer();
        computer.open();
        computer.useUsbDevice(new Mouse());
        System.out.println("==============");
        computer.useUsbDevice(new KeyBoard());
        computer.close();
    }
}
